package stockblaster.client.objectives;

public abstract class Objective {
	public static int MONEY_OBJECTIVE = 1;
	public static int TIME_OBJECTIVE = 2;
	
	/**
	 * Creates an objective with a given description.
	 * 
	 * @param description
	 *            The English description of the objective.
	 */
	public Objective(String description, int sensitivity) {
		this.description = description;
		this.completed = false;
		this.objectiveSensitivity = sensitivity;
	}

	/**
	 * Check whether the conditions of the objective have been met. It is unique
	 * to each type of objective.
	 * 
	 * @return Whether or not the conditions of the objective have been met.
	 */
	public abstract boolean check();

	/**
	 * Returns the English form of the objective conditions.
	 * 
	 * @return A string describing the conditions of the objective.
	 */
	public String getObjective() {
		return description;
	}

	/**
	 * Sets the objective as having been completed. Should be called after
	 * check, but decoupled for debugging purposes.
	 */
	public void complete() {
		this.completed = true;
	}

	/**
	 * Gets whether or not the objective has been completed.
	 * 
	 * @return Whether or not the objective has been completed.
	 */
	public boolean isCompleted() {
		return completed;
	}
	
	public int getObjectiveSensitivity() {
		return objectiveSensitivity;
	}
	
	/**
	 * Implement this
	 */
	public Integer getMoneyGoal() {
		return 0;
	}
	

	private String description;
	private boolean completed;
	private int objectiveSensitivity;
}
